---
import { FaGithub } from 'react-icons/fa/index';

import { SpecialButton } from './special-button';
import { Container } from './container';
---

<div class="source">
  <Container>
    <div class="wrapper">
      <div class="iconContainer">
        <div class="tail"></div>
        <div class="icon">
          <FaGithub />
        </div>
      </div>

      <h2 class="title">Open Source</h2>
      <p class="desc">Moodist is free and open-source!</p>

      <div class="button">
        <SpecialButton href="https://github.com/remvze/moodist">
          Source Code
        </SpecialButton>
      </div>
    </div>
  </Container>
</div>

<style>
  .source {
    margin-top: 40px;

    & .wrapper {
      position: relative;
      padding: 0 20px 40px;
      background: linear-gradient(transparent, rgb(24 24 27 / 70%));
      border-radius: 0 0 20px 20px;

      &::after {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 70%;
        height: 1px;
        content: '';
        background: linear-gradient(
          90deg,
          transparent,
          var(--color-neutral-400),
          transparent
        );
        transform: translateX(-50%);
      }
    }

    & .iconContainer {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 15px;

      & .tail {
        width: 1px;
        height: 75px;
        background: linear-gradient(transparent, var(--color-neutral-300));
      }

      & .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        font-size: var(--font-md);
        background-color: var(--color-neutral-100);
        border: 1px solid var(--color-neutral-300);
        border-radius: 50%;
      }
    }

    & .title {
      font-family: var(--font-display);
      font-size: var(--font-lg);
      font-weight: 600;
      text-align: center;
    }

    & .desc {
      margin-top: 8px;
      color: var(--color-foreground-subtle);
      text-align: center;
    }

    .button {
      display: flex;
      justify-content: center;
      margin: 16px auto 0;
    }
  }
</style>
